package com.test.ssm.article.dao;

import com.test.ssm.article.entity.pojo.SystemRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SystemRoleMapper {
    boolean deleteByPrimaryKey(String roleId);

    boolean insert(SystemRole record);

    boolean insertSelective(SystemRole record);

    SystemRole selectByPrimaryKey(String roleId);

    boolean updateByPrimaryKeySelective(SystemRole record);

    boolean updateByPrimaryKey(SystemRole record);

    List<SystemRole> getAll();

    List<SystemRole> getAllByPage(@Param("roleState") Byte roleState,
                                  @Param("roleName") String roleName,
                                  @Param("pageNum") Integer pageNum,
                                  @Param("pageSize") Integer pageSize);

    Long countAllByLike(@Param("state") Integer roleState,
                        @Param("name") String roleName);

    SystemRole selectOneByName(String roleName);

    Boolean deleteOneById(String roleId);

    long batchDelete(String roleIds);

}